package com.ttc.group2.videochat.utils;

import android.content.Context;
import android.widget.Toast;

public class Utils {
	
	// VideoChat
	public static final String APP_ID = "21125";
	public static final String AUTH_KEY = "p2UYAtLqGTTTdbU";
	public static final String AUTH_SECRET = "zDQ3cXYvVVR4TR2";
	public static final String DB_NAME = "DbVideoChat";
	public static final String DB_TABLE = "Friendlist";
	public static final String KEY_ID = "_id";
	public static final String KEY_OWNER_ID = "oid";
	public static final String KEY_FRIEND_ID = "fid";
	public static final String DELETE_ERROR = "Delete Error";
	public static final int ANIMATION_DURATION = 350;
	public static final int FULL_NAME_LENGHT = 3;
	public static final int USERNAME_LENGHT = 3;
	public static final int PASSWORD_LENGHT = 8;
	public static final int WAIITING_TIME = 30000;

	public static void showToast(Context cxt, String textToShow) {
		Toast.makeText(cxt, textToShow, Toast.LENGTH_SHORT).show();
	}

	public static void showToast(Context cxt, int rid) {
		String textToShow = cxt.getResources().getString(rid);
		Toast.makeText(cxt, textToShow, Toast.LENGTH_SHORT).show();
	}

	public static String getResourseString(Context cxt, int rid) {
		return cxt.getResources().getString(rid);
	}

	public static int getResourseInteger(Context cxt, int rid) {
		return (int) cxt.getResources().getDimension(rid);
	}
}
